package org.antbook;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * 
 */

/**
 * @author Chaitanya Kulkarni
 * 
 */
public class BookTest extends TestCase {
	/** * setUp() method that initializes common objects */
	private Book book1;
	private Book book2;
	protected void setUp() throws Exception {
		super.setUp();
		book1 = new Book("ES", 12.99);
		book2 = new Book("The Gate", 11.99);
		new Book("ES", 12.99);
	}

	/** * tearDown() method that cleanup the common objects */
	protected void tearDown() throws Exception {
		super.tearDown();
		book1 = null;
		book2 = null;
	}

	/** * Constructor for BookTest. * @param name */
	public BookTest(String name) {
		super(name);
	}

	public void testEquals() {
		assertFalse(book2.equals(book1));
		assertTrue(book1.equals(book1));
	}

	

	public static Test suite() {
		TestSuite suite = new TestSuite();
		suite.addTest(new BookTest("testEquals"));
		return suite;
	}
}
